### 设置交叉编译工具（一定要在project之前设置！！！）
include(CMakeForceCompiler)
# 设置交叉编译器的位置
if(MY_CROSS_COMPILER_PATH)
else()
    set(MY_CROSS_COMPILER_PATH "C:/cross_compilers/aarch64-linux-gnu")
endif()
message(STATUS "MY_CROSS_COMPILER_PATH=${MY_CROSS_COMPILER_PATH}")

set(CMAKE_C_COMPILER "${MY_CROSS_COMPILER_PATH}/bin/aarch64-linux-gnu-gcc.exe")
set(CMAKE_CXX_COMPILER "${MY_CROSS_COMPILER_PATH}/bin/aarch64-linux-gnu-c++.exe")
# set(CMAKE_LINKER "${MY_CROSS_COMPILER_PATH}/bin/aarch64-linux-gnu-ld.exe")
set(CMAKE_FIND_ROOT_PATH "${MY_CROSS_COMPILER_PATH}/aarch64-linux-gnu")
# 指定目标系统的类型
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

message(STATUS "Using toolchain file: ${CMAKE_TOOLCHAIN_FILE}.")

